import VueRouter from 'vue-router'
const routes = [
  { path: '/login', component: () => import("./pages/login"), name: "登陆" },
  {
    path: '/', component: () => import("./pages/index"), name: "admin", meta: { auth: true }, children:
      [
        { path: '/user', component: () => import("./pages/user/user"), name: "user" },
        { path: '/pet', component: () => import("./pages/petowners/pet"), name: "petowners" },
        { path: '/eidtUser/:id', component: () => import("./pages/user/eidtUser"), name: "eidtUser" },
        { path: '/men', component: () => import("./pages/men"), name: "store" },
        { path: '/supplier', component: () => import("./pages/supplier/supplier"), name: "supplier" },   //洪刚
        { path: '/addsupplier', component: ()=>import("./pages/supplier/addsupplier"),name:"添加供应商"},   //洪刚
        { path: '/uploadsupplier/:id', component: ()=>import("./pages/supplier/uploadsupplier"),name:"修改供应商"},   //洪刚
        { path: '/supplier/:id', component: ()=>import("./pages/suppliergoods/suppliergoods"),name:"查看货品"},   //洪刚
        { path: '/addsuppliergoods/supplier/:id', component: ()=>import("./pages/suppliergoods/addsuppliergoods"),name:"添加货品"},   //洪刚
        { path: '/uploadsuppliergoods/:id', component: ()=>import("./pages/suppliergoods/uploadsuppliergoods"),name:"修改货品"},   //洪刚
        { path: '/commoditysales', component: ()=>import("./pages/commoditysales/commoditysales"),name:"commoditysales"},  //商品销售情况 //洪刚
        { path: '/addStore', component: () => import("./pages/store/addStore"), name: "addStore" },
        { path: '/editStore/:id', component: () => import("./pages/store/editStore"), name: "editStore" },
        { path: '/addPetowners', component: () => import("./pages/petowners/addPetowners"), name: "添加宠物主" },
        { path: '/updatePetowners/:id', component: () => import("./pages/petowners/PetownersEdit"), name: "修改宠物主" },
        { path: '/addChong/:id', component: () => import("./pages/petowners/addChong"), name: "添加宠物" },
        { path: '/petInfo/:id', component: () => import("./pages/petowners/petInfo"), name: "查看宠物" },
        { path: '/updateChong/:id', component: () => import("./pages/petowners/updateChong"), name: "修改宠物" },
        { path: '/mendian.vue', component: () => import("./pages/mendian.vue"), name: "门店分布图" },

      ]
  }
]


export default new VueRouter({
  mode: "history",
  routes
})
